#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>

int main()
{
    int n = 0;
    scanf("%d", &n);
    int sum[40] = { 1,1 };
    for (int i = 2; i < 40; i++)
    {
        sum[i] = sum[i - 1] + sum[i - 2];
    }
    printf("%d\n",sum[n]);
	return 0;
}